****************Public vs Private
use HKCFA_u.dta, clear 


sort year


eststo clear

eststo:  reghdfe forei_nouk position_foreignnonper if all > 0 & gov == 1, a(year)  vce(cluster panel_id)  
estadd local YearFE "\checkmark" 

estadd local CaseFE "" 

eststo:  reghdfe forei_nouk position_foreignnonper degree_doctorate profession_professor if all > 0 & gov == 1, a(year) vce(cluster panel_id) 


estadd local YearFE "\checkmark" 

estadd local CaseFE "" 

eststo:  reghdfe forei_nouk position_foreignnonper degree_doctorate profession_professor  if all > 0 & gov == 1, a(year issue) vce(cluster panel_id) 


estadd local YearFE "\checkmark" 

estadd local CaseFE "\checkmark" 


eststo:  reghdfe uk position_foreignnonper if all > 0 & gov == 1, a(year) vce(cluster panel_id) 

estadd local YearFE "\checkmark" 

estadd local CaseFE "" 

eststo:  reghdfe uk position_foreignnonper degree_doctorate profession_professor  if all > 0  & gov == 1, a(year)vce(cluster panel_id)


estadd local YearFE "\checkmark" 
 
estadd local CaseFE "" 

eststo:  reghdfe uk position_foreignnonper degree_doctorate profession_professor if all > 0 & gov == 1, a(year issue) vce(cluster panel_id)


estadd local YearFE "\checkmark" 

estadd local CaseFE "\checkmark" 



eststo:  reghdfe hk position_foreignnonper if all > 0 & gov == 1, a(year) vce(cluster panel_id) 
estadd local YearFE "\checkmark" 

estadd local CaseFE "" 

eststo:  reghdfe hk position_foreignnonper degree_doctorate profession_professor  if all > 0 & gov == 1, a(year) vce(cluster panel_id) 

estadd local YearFE "\checkmark" 

 
estadd local CaseFE "" 

eststo:  reghdfe hk position_foreignnonper degree_doctorate profession_professor  if all > 0 & gov == 1, a(year issue) vce(cluster panel_id)

estadd local YearFE "\checkmark" 

 
estadd local CaseFE "\checkmark" 


eststo:  reghdfe inter position_foreignnonper if all > 0 & gov == 1, a(year) vce(cluster panel_id) 
estadd local YearFE "\checkmark" 
 
estadd local CaseFE "" 

eststo:  reghdfe inter position_foreignnonper degree_doctorate profession_professor  if all > 0 & gov == 1, a(year) vce(cluster panel_id) 


estadd local YearFE "\checkmark" 

estadd local CaseFE "" 

eststo:  reghdfe inter position_foreignnonper degree_doctorate profession_professor  if all > 0 & gov == 1, a(year issue) vce(cluster panel_id)


estadd local YearFE "\checkmark" 

estadd local CaseFE "\checkmark" 



eststo:  reghdfe all position_foreignnonper if  gov == 1, a(year) vce(cluster panel_id) 

estadd local YearFE "\checkmark" 
estadd local CaseFE "" 

eststo:  reghdfe all position_foreignnonper degree_doctorate profession_professor if gov == 1, a(year) vce(cluster panel_id) 



estadd local YearFE "\checkmark" 
 
estadd local CaseFE "" 

eststo:  reghdfe all position_foreignnonper degree_doctorate profession_professor if gov == 1, a(year issue) vce(cluster panel_id)


 estadd local YearFE "\checkmark" 

estadd local CaseFE "\checkmark" 


label variable forei_nouk "Foreign "
label variable inter "International"
label variable hk "Hong Kong"
label variable uk "UK"
label variable all "All"

label variable position_foreignnonper "Foreign Judge"

label variable profession_professor "Professor"


label variable degree_doctorate "Doctorate Degree"

esttab using "results/public.tex", replace se label star(* .10 ** .05 *** .01) nocon b(3) nonote order(position_foreignnonper degree_doctorate profession_professor) s(N, label("N") fmt(0 %9.3f))

eststo clear

eststo:  reghdfe forei_nouk position_foreignnonper if all > 0 & gov == 0, a(year)  vce(cluster panel_id)  
estadd local YearFE "\checkmark" 

estadd local CaseFE "" 

eststo:  reghdfe forei_nouk position_foreignnonper degree_doctorate profession_professor if all > 0 & gov == 0, a(year) vce(cluster panel_id) 


estadd local YearFE "\checkmark" 

estadd local CaseFE "" 

eststo:  reghdfe forei_nouk position_foreignnonper degree_doctorate profession_professor  if all > 0 & gov == 0, a(year issue) vce(cluster panel_id) 


estadd local YearFE "\checkmark" 

estadd local CaseFE "\checkmark" 


eststo:  reghdfe uk position_foreignnonper if all > 0 & gov == 0, a(year) vce(cluster panel_id) 

estadd local YearFE "\checkmark" 

estadd local CaseFE "" 

eststo:  reghdfe uk position_foreignnonper degree_doctorate profession_professor  if all > 0  & gov == 0, a(year)vce(cluster panel_id)


estadd local YearFE "\checkmark" 
 
estadd local CaseFE "" 

eststo:  reghdfe uk position_foreignnonper degree_doctorate profession_professor if all > 0 & gov == 0, a(year issue) vce(cluster panel_id)


estadd local YearFE "\checkmark" 

estadd local CaseFE "\checkmark" 



eststo:  reghdfe hk position_foreignnonper if all > 0 & gov == 0, a(year) vce(cluster panel_id) 
estadd local YearFE "\checkmark" 

estadd local CaseFE "" 

eststo:  reghdfe hk position_foreignnonper degree_doctorate profession_professor  if all > 0 & gov == 0, a(year) vce(cluster panel_id) 

estadd local YearFE "\checkmark" 

 
estadd local CaseFE "" 

eststo:  reghdfe hk position_foreignnonper degree_doctorate profession_professor  if all > 0 & gov == 0, a(year issue) vce(cluster panel_id)

estadd local YearFE "\checkmark" 

 
estadd local CaseFE "\checkmark" 


eststo:  reghdfe inter position_foreignnonper if all > 0 & gov == 0, a(year) vce(cluster panel_id) 
estadd local YearFE "\checkmark" 
 
estadd local CaseFE "" 

eststo:  reghdfe inter position_foreignnonper degree_doctorate profession_professor  if all > 0 & gov == 0, a(year) vce(cluster panel_id) 


estadd local YearFE "\checkmark" 

estadd local CaseFE "" 

eststo:  reghdfe inter position_foreignnonper degree_doctorate profession_professor  if all > 0 & gov == 0, a(year issue) vce(cluster panel_id)


estadd local YearFE "\checkmark" 

estadd local CaseFE "\checkmark" 



eststo:  reghdfe all position_foreignnonper if  gov == 0, a(year) vce(cluster panel_id) 

estadd local YearFE "\checkmark" 
estadd local CaseFE "" 

eststo:  reghdfe all position_foreignnonper degree_doctorate profession_professor if gov == 0, a(year) vce(cluster panel_id) 



estadd local YearFE "\checkmark" 
 
estadd local CaseFE "" 

eststo:  reghdfe all position_foreignnonper degree_doctorate profession_professor if gov == 0, a(year issue) vce(cluster panel_id)


 estadd local YearFE "\checkmark" 

estadd local CaseFE "\checkmark" 


label variable forei_nouk "Foreign "
label variable inter "International"
label variable hk "Hong Kong"
label variable uk "UK"
label variable all "All"

label variable position_foreignnonper "Foreign Judge"

label variable profession_professor "Professor"


label variable degree_doctorate "Doctorate Degree"

esttab using "results/private.tex", replace se label nocon b(3) substitute ("\multicolumn{16}{l}{\footnotesize" "\multicolumn{16}{p{2.2  \textwidth}}{\footnotesize \textit{Notes:}") nonote addnote("The dependent variable in columns (1)-(3) is the number of unique foreign case citations. The dependent variable in columns (4)-(6) is the number of unique UK case citations. The dependent variable in columns (7)-(9) is the number of unique HK case citations. The dependent variable in columns (10)-(12) is the number of unique international case citations. The dependent variable in columns (13)-(15) is the number of unique case citations for all case types. Foreign Judge denotes whether the case is heard by a panel that includes a foreign (non-UK) non-permanent judge. Doctorate Degree denotes whether the non-permanent judge has a doctorate degree. Professor denotes whether the non-permanent judge has been a professor. Standard errors are clustered by panel in parentheses. All regressions are estimated using OLS models. The constant is omitted from the table. $^{***}$p $<$ .01; $^{**}$p $<$ .05; $^{*}$p $<$ .1") star(* .10 ** .05 *** .01) order(position_foreignnonper degree_doctorate profession_professor) s(N YearFE CaseFE, label("N" "Year" "Substantive Issue") fmt(0 %9.3f))


include "https://raw.githubusercontent.com/steveofconnell/PanelCombine/master/PanelCombine.do"
panelcombine, use(public.tex private.tex)  columncount(10) paneltitles("Public Law Cases" "Private Law Cases") save(Table_4.tex) cleanup
